<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
		<title>Title</title>
		<style>
				table>thead>tr>th, table>tbody>tr>th, table>tfoot>tr>th, table>thead>tr>td, table>tbody>tr>td,table>tfoot>tr>td {
						border-collapse: collapse;
						border-spacing: 0;
						border: 1px solid #ddd;
						text-align: center;
				}
				table{
						border-collapse: collapse;
						border-spacing: 0;
						width: 100%;
						border: 1px solid #ddd;
				}
				tbody>tr:nth-child(odd){
						background-color: #dff0d8;
				}
				body{
						background: #E7F4FE;
				}
				.full_box{
						width: 100%;

				}
		</style>
</head>
<body>
<div class="full_box">
		<p><h3>[[${author.nickName} ]]的全部作品</h3></p>
</div>
<table>
		<thead>
		<tr>
				<th>小说名</th>
				<th>类型</th>
				<th>状态</th>
				<th>字数</th>
				<th>简介</th>
				<th>最后更新时间</th>
				<th>点击量</th>
				<th>月票数</th>
				<th>下载量</th>
				<th>操作</th>
		</tr>
		</thead>
		<tbody>
				<tr th:each="auth:${author.works}">
						<td>[[${auth.bookName}]]</td>
						<td  >
								<span th:each="noveltype:${auth.bookType}">[[${noveltype}]]</span>
						</td>
						<td>[[${auth.bookState}]]</td>
						<td>[[${auth.bookWords}]]</td>
						<td>[[${#strings.length(auth.bookIntro) > 20 ?#strings.substring(auth.bookIntro,0,20):auth.bookIntro}]]......</td>
						<td>[[${#dates.format(auth.updateTime, 'yyyy年MM月dd日')}]]</td>
						<td>[[${auth.totalHits}]]</td>
						<td>[[${auth.monthlyTickets}]]</td>
						<td>[[${auth.downloads}]]</td>
						<td>
								<button><a th:href="@{${auth.bookState=='完结'||auth.bookState=='完本'?'#':'/auth/addUI'}}" >
										<stronge style="color: red" th:if="${auth.bookState=='完结'||auth.bookState=='完本'}">完本</stronge>
										<!--[[${auth.bookState=="完结"||auth.bookState=="完本"?"":"写作"}]]-->
										<span th:if="${auth.bookState!='完结'&&auth.bookState!='完本'}">写作</span>
								</a></button>
						</td>
				</tr>
		</tbody>
</table>
</body>
</html>